package newsrecommendation.datamodel.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import newsrecommendation.test.DataLoader;

/**
 *
 * @author Andrea
 */
public class DemographicStatistics {

    private static DemographicStatistics instance;
    HashMap<UserType, List<Double>> demographicStatistics;

    private DemographicStatistics() {
        demographicStatistics = new HashMap();
        //TODO- Calculate this
        demographicStatistics = DataLoader.get().getDemographicStatistics();
    }

    public static DemographicStatistics get() {
        if (instance == null) {
            instance = new DemographicStatistics();
        }
        return instance;
    }

    public List<Double> getDemographicInterests(UserType userType) {
       if (demographicStatistics.containsKey(userType)) {
    	   return demographicStatistics.get(userType);
        }
        
        return new ArrayList();
    }
}
